<%@ page contentType="text/html; charset=UTF-8" %> 
<%@page import="net.zhnb.util.*"%>
<%@ page import="net.zhnb.bean.*"%>
<%@page import="java.util.*"%>
<%@page import="finaler.util.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<jsp:include page="adminImport.jsp"/>
</head>
<% 
	PageList lotteryList =  (PageList) request.getAttribute("lotteryList"); 
%>

<script>
	function del(id){
		if(confirm("确定吗!")){
			var url =  "<%=Constants.URL%>/admin/lotteryDel_"+id;
			window.location = url;
		}
	}
</script>

<body>

<a href="<%=Constants.URL %>/admin/menu">返回</a><br/><br/>

<form action="<%=Constants.URL%>/admin/lotteryManage" id="aform" name="aform" method="post">
	手机号:<input type="text" id="mobile" name="mobile"/>
	<input type="submit" value="查询" />
</form>



<!-- Table goes in the document BODY -->
<table class="hovertable">
	<tr>
	    <th>手机号</th><th>抽奖场馆</th><th>抽奖展位</th><th>第几轮</th><th>投奖时间</th><th>有否中奖</th><th>有否分享</th><th>删除</th>
	</tr>
	<%
	for( int i=0;i<lotteryList.getList().size();i++){
		Map<String,Object> lottery = (HashMap<String,Object>) lotteryList.getList().get(i);
	%>
		<tr align="center" onmouseover="this.style.backgroundColor='#ffffff';" onmouseout="this.style.backgroundColor='#d4e3e5';">
		    <td><%=lottery.get("mobile")%></td>
		    <td><%=lottery.get("roomname")%></td>
		    <td><%=lottery.get("showername")%></td>
		    <td>第<%=lottery.get("lun")%>轮</td>
		    <td><%=lottery.get("datetime")%></td>
		    <td><%=lottery.get("result").equals(0)?"<font color=\"red\">没中奖</font>":"<font color=\"green\">中奖</font>"%></td>
		    <td><%=lottery.get("shareflag").equals(0)?"<font color=\"red\">没分享</font>":"<font color=\"green\">已分享</font>"%></td>
		    <td><a href="###" onclick="del('<%=lottery.get("id")%>')">删除</a></td>
		</tr>
	<%} %>
		<tr>
		    <td colspan="8">
				<%=PageUtil.getCurrPage(lotteryList)%>
				<%=PageUtil.getRecord(lotteryList)%>
				<%=PageUtil.getSinglePaginator(lotteryList,false)%>
		    </td>
		</tr>
</table>



</body>
</html>